home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
001-025
/
disk_023
/
ver30
/
tty
/
intuition
/
ttydef.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
2KB
|
92 lines
/*
* Name: MicroEMACS
* Amiga console device virtual terminal header file
* Version: 31
* Last edit: 20-Apr-86
* Created: 20-Apr-86 ...!ihnp4!seismo!ut-sally!ut-ngp!mic
* Add Intuition menu support
*
*/
#define GOSLING 1 /* Compile in fancy display. */
#define MEMMAP 0 /* Not memory mapped video. */
#define NROW 23 /* Rows. */
#define NCOL 77 /* Columns (AmigaDOS) */
/*
* Special keys for the default Amiga console device keymap.
* Function key codes are in the form <CSI>v~
* where v is a 1 or 2-digit code between 0 and 19,
* so they comprise the first 20 entries in the key
* table. The next 12 entries are for the help and
* arrow keys. There is no shifted value for the
* HELP key.
*/
#define KF1 K01
#define KF2 K02
#define KF3 K03
#define KF4 K04
#define KF5 K05
#define KF6 K06
#define KF7 K07
#define KF8 K08
#define KF9 K09
#define KF10 K0A
#define KSF1 K0B
#define KSF2 K0C
#define KSF3 K0D
#define KSF4 K0E
#define KSF5 K0F
#define KSF6 K10
#define KSF7 K11
#define KSF8 K12
#define KSF9 K13
#define KSF10 K14
#define KUP K15
#define KSUP K16
#define KDOWN K17
#define KSDOWN K18
#define KLEFT K19
#define KSLEFT K1A
#define KRIGHT K1B
#define KSRIGHT K1C
#define KHELP K1D
/* The 'menu' key doesn't really appear on the
* Amiga keyboard. When ttgetc() sees a menu
* event, it saves the menu number and item,
* then stuffs the sequence for KMENU into
* the input buffer.
*/
#define KMENU K1E
/*
* Similarly, this is the way we shoehorn the
* mouse into the input stream, using the last
* function key value for this purpose.
*/
#define KMOUSE K1F
/*
* Intuition menu interface. Each set of menu items
* kept in a table of MenuBinding structures, which
* is in turn kept in a table of MenuInfo structures.
*
* These tables are indexed via the menu and item
* numbers to find the internal extended name of
* the function associated with a certain item.
*/
struct MenuBinding {
char *Command;
char *Binding;
};
struct MenuInfo {
char *Name; /* name of menu */
short NumItems; /* # of items */
short MenuWidth; /* width, in CHARACTERS */
struct MenuBinding *Items; /* item name, internal binding */
};
#define NITEMS(arr) (sizeof(arr) / (sizeof(arr[0])))